﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LeePong.Game.Engines
{
    public class CollisionManager : ICollisionManager
    {
        private Engine _engine;

        public CollisionManager(Engine engine)
        {
            _engine = engine;
        }

        public void OnLandTop()
        {
            _engine.Ball.InvertAngle();
        }

        public void OnLandBottom()
        {
            _engine.Ball.InvertAngle();
        }

        public void OnLandRight()
        {
            _engine.Ball.ReflectAngle();
            _engine.LeftScore.Increment();
        }

        public void OnLandLeft()
        {
            _engine.Ball.ReflectAngle();
            _engine.RightScore.Increment();
        }

        public void OnLeftRacket()
        {
            _engine.VirtualPlayer.Shoot();
        }

        public void OnRightRacket()
        {
            _engine.Ball.ReflectAngle();
        }


    }
}
